SET(CARINA_COMMON_SRC
    system.cc
    ces-file.cc
    logging.cc
    timer.cc
    memory.cc
    carina-main.cc
    assert.cc
    parse-command-line.cc
    )

SET(CARINA_COMMON_INCLUDES
    ${CARINA_COMMON_DIR}/include/carina/common/system.hh
    ${CARINA_COMMON_DIR}/include/carina/common/global.hh
    ${CARINA_COMMON_DIR}/include/carina/common/containers.hh
    ${CARINA_COMMON_DIR}/include/carina/common/memory.hh
    ${CARINA_COMMON_DIR}/include/carina/common/ces-file-format.hh
    ${CARINA_COMMON_DIR}/include/carina/common/ces-file.hh
    ${CARINA_COMMON_DIR}/include/carina/common/patterns.hh
    ${CARINA_COMMON_DIR}/include/carina/common/types.hh
    ${CARINA_COMMON_DIR}/include/carina/common/exception.hh
    ${CARINA_COMMON_DIR}/include/carina/common/logging.hh
    ${CARINA_COMMON_DIR}/include/carina/common/timer.hh
    ${CARINA_COMMON_DIR}/include/carina/common/common.hh
	${CARINA_COMMON_DIR}/include/carina/common/testing.hh
	${CARINA_COMMON_DIR}/include/carina/common/assert.hh
    )

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}
                    ${CARINA_COMMON_DIR}/include
                    ${CARINA_COMMON_BIN_DIR}/include
                    )
    
ADD_LIBRARY(carina_common STATIC ${CARINA_COMMON_SRC} ${CARINA_COMMON_INCLUDES})

ADD_LIBRARY(carina_common_silent STATIC ${CARINA_COMMON_SRC} ${CARINA_COMMON_INCLUDES})

SET_TARGET_PROPERTIES (carina_common_silent PROPERTIES COMPILE_DEFINITIONS "CE_LOG_ASSERTS")

INSTALL(TARGETS carina_common carina_common_silent DESTINATION "lib")